<template>
	<view class="my_page">
		<u-navbar title="个人中心" :is-back="false"></u-navbar>
		<view class="userinfo">
			<view class="avert">
				<image :src="userInfo.avatar" mode="aspectFill"></image>
			</view>
			<view class="nickname">{{userInfo.nickname}}</view>
		</view>
		<view class="mb_data">
			<image src="/static/my_bg.png"></image>
			<view class="level">
				<view class="sum">20</view>
				<view class="tex">已闯关</view>
			</view>
			<view class="level">
				<view class="sum">20</view>
				<view class="tex">闯关总分</view>
			</view>
			<view class="level">
				<view class="sum">20</view>
				<view class="tex">光荣榜</view>
			</view>
		</view>
		<view class="uc_caec">
			<view class="title_img">
				<image src="/static/my_ti.png" mode="widthFix"></image>
			</view>
			<view class="b_top">
				<view class="leb_itme" v-for="(item,index) in levlist" :key="index">
					<image :src="'/static/my' + (index + 1)  + '.png'" mode="widthFix"></image>
					<text>{{item.name}}</text>
				</view>
			</view>
			<view class="b_botm">
				<view class="leb_itme" v-for="(item,index) in levlist1" :key="index">
					<image :src="'/static/myb_' + (index + 1)  + '.png'" mode="widthFix"></image>
					<text>{{item.name}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapGetters,
		mapState
	} from 'vuex';
	export default{
		computed:{
			...mapState({
				userInfo: state => state.user.userInfo
			}),
		},
		onLoad() {
			this.urlimg = this.$imgurl	
		},
		data(){
			return{
				urlimg:'',
				levlist:[
					{
						name:'我的闯关'
					},
					{
						name:'我的订单'
					}
				],
				levlist1:[
					{
						name:'我的班级'
					},
					{
						name:'我的成绩'
					},
					{
						name:'我的资料'
					},
					{
						name:'联系老师'
					}
				]
			}
		}
	}
</script>

<style lang="scss" scoped>
	::v-deep{
		.u-navbar{
			background: linear-gradient(180deg, rgba(214, 227, 255, 1) 70%, rgba(255, 255, 255, 0.01) 100%) !important;
		}
	}
	.my_page{
		padding: 30rpx 25rpx;
		.userinfo{
			display: flex;
			align-items: center;
			.avert{
				width: 120rpx;
				height: 120rpx;
				image{
					width: 100%;
					height: 100%;
					border-radius: 50%;
				}
			}
			.nickname{
				font-size: 36rpx;
				margin-left: 20rpx;
			}
		}
		.mb_data{
			width: 684rpx;
			margin-top: 20rpx;
			height: 150rpx;
			position: relative;
			display: flex;
			align-items: center;
			image{
				z-index: -1;
				width: 100%;
				position: absolute;
				height: 100%;
			}
			.level{
				width: 33.33%;
				display: flex;
				flex-direction: column;
				align-items: center;
				.sum{
					font-size: 40rpx;
					color: #fff;
				}
				.tex{
					color: rgba(255, 255, 255, 1);
					margin-top: 10rpx;
					font-size: 24rpx;

				}
			}
		}
		.uc_caec{
			height: 512rpx;
			margin-top: 20rpx;
			padding: 35rpx 0;
			opacity: 1;
			border-radius: 32rpx;
			background: rgba(255, 255, 255, 1);
			.title_img{
				width: 243.61rpx;
				margin: 0 auto;
                image{
					width: 100%;
					height: auto;
				}
			}
		}
		.b_top{
			display: flex;
			align-items: center;
			width: 90%;
			margin: 20rpx auto;
			border-bottom: 2rpx solid rgba(245, 245, 245, 1);
			padding-bottom: 30rpx;
			.leb_itme{
				width: 50%;
				display: flex;
				align-items: center;
			   justify-content: center;
			   flex-direction: column;
				image{
					width: 92rpx;
					height: 92rpx;
				}
			}
		}
		.b_botm{
			display: flex;
			align-items: center;
			justify-content: center;
			padding-top: 30rpx;
			.leb_itme{
			   width: 25%;
			    display: flex;
				align-items: center;
			   justify-content: center;
			   flex-direction: column;
				image{
					width: 55.1rpx;
					margin-bottom: 15rpx;
					height: auto;
				}
				color: rgba(125, 125, 125, 1);
				font-size: 28rpx;
			}
		}
	}
</style>